﻿using System;
using System.Collections.Generic;
using System.Text;

namespace 超市收银系统
{
    class DiscountBuySong:DiscountFather
    {
        public double Buy
        {
            get;
            set;
        }
        public double Song
        {
            get;
            set;
        }
        public DiscountBuySong(double buy,double song)
        {
            this.Buy = buy;
            this.Song = song;
        }
        public override double GetTotalMoney(double money)
        {
            return money - (int)(money / this.Buy) * this.Song;
        }

    }
}
